home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / util / blank / bserver_v14.lha / BServer_v1.4 / Sources.lha / Sources / clients / BlackScreen.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-23  |  1.4 KB  |  68 lines

  1. ;/*
  2. sc RESOPT DATA=NEAR UCHAR CONSTLIB STREQ NMINC STRMERGE NOSTKCHK NOSTDIO OPTIMIZE OPTSIZE IGNORE=73 BlackScreen.c
  3. slink from LIB:c.o BlackScreen.o to //Clients/BlackScreen LIB LIB:sc.lib LIB:amiga.lib /lib/client.lib SC SD STRIPDEBUG NOICONS
  4. delete blackscreen.o
  5. quit
  6.  
  7.  BlackScreen 1.2  (Client for BServer)
  8.  
  9.  Copyright © 1994-1995 Stefano Reksten of 3AM - The Three Amigos!!!
  10.  All rights reserved.
  11. */
  12.  
  13. #include <exec/types.h>
  14. #include <exec/memory.h>
  15.  
  16. #include <proto/exec.h>
  17. #include <proto/intuition.h>
  18. #include <proto/graphics.h>
  19.  
  20. #include "/include/client.h"
  21.  
  22. char *ver = "$VER: BlackScreen 1.2 "__AMIGADATE__;
  23.  
  24. struct IntuitionBase *IntuitionBase;
  25. struct GfxBase *GfxBase;
  26. struct DisplayIDInformation *dinfo;
  27.  
  28. void Blank( void )
  29. {
  30. struct Screen *scr;
  31.  
  32. if ( scr = OpenScreenTags( NULL,
  33.     SA_Depth, 0,
  34.     SA_DisplayID, DISPLAYID( dinfo ),
  35.     TAG_END ) )
  36.     {
  37.     register struct ViewPort *vp = &(scr->ViewPort);
  38.  
  39.     SpritesOff();
  40.  
  41.     SetRGB4( vp, 0, 0, 0, 0 );
  42.  
  43.     (void)WaitServerCommand();
  44.     CloseScreen( scr );
  45.     SpritesOn();
  46.     }
  47. else
  48.     SendClientMsg( ACTION_FAILED );
  49. }
  50.  
  51.  
  52. void __main( char *line )
  53. {
  54. if ( IntuitionBase = (struct IntuitionBase *)OpenLibrary( "intuition.library", 37L ) )
  55.     {
  56.     if ( GfxBase = (struct GfxBase *)OpenLibrary( "graphics.library", 37L ) )
  57.         {
  58.         if ( dinfo = OpenCommunication() )
  59.             {
  60.             Blank();
  61.             CloseCommunication( dinfo );
  62.             }
  63.         CloseLibrary( (struct Library *)GfxBase );
  64.         }
  65.     CloseLibrary( (struct Library *)IntuitionBase );
  66.     }
  67. }
  68.